package com.itheima.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.annotation.AutoFill;
import com.itheima.enumeration.OperationType;
import com.itheima.pojo.entity.Clazz;
import com.itheima.pojo.dto.ClazzQuery;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ClazzMapper extends BaseMapper<Clazz> {
    /*List<Clazz> page(ClazzQuery clazzQuery);*/

    /*@Delete("delete from clazz where id=#{id};")
    void delete(Integer id);*/

    /*@Select("select id, name, room, begin_date, end_date, master_id, subject, create_time, update_time from clazz where id = #{id};")
    Clazz findById(Integer id);*/


    /*@AutoFill(OperationType.UPDATE)
    void update(Clazz clazz);*/

    /*@AutoFill(OperationType.INSERT)
    @Insert("insert into clazz (id, name, room, begin_date, end_date, master_id, subject, create_time, update_time) values (#{id},#{name},#{room},#{beginDate},#{endDate}" +
            ",#{masterId},#{subject},#{createTime},#{updateTime});")
    void save(Clazz clazz);*/

    /*@Select("select id, name, room, begin_date, end_date, master_id, subject, create_time, update_time from clazz;")
    List<Clazz> findAll();*/
}
